<!DOCTYPE html>
<html lang="en">

<head>
    <title></title>

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta http-equiv="Content-Language" content="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="UTF-8" />

    <style>
        body,
        div,
        p,
        ul,
        li,
        span {
            margin: 0px;
            padding: 0px;
        }


        #wrap {
            margin: 0 auto;
            min-width: 1024px;
            padding: 0;
            width: 1024px;
            text-align: center;
        }

        #main {
            border-bottom: none;
        }

        #main .left {
            margin: 175px 0 0 24px;
            float: left;
        }

        #main .angel {
            background: url() no-repeat scroll transparent;
            height: 250px;
            margin: 63px 0 0 157px;
            width: 250px
        }

        #main .dt1 {
            max-width: 590px;
            color: #d21e1e;
            font-size: 20px;
        }
    </style>
    <script type="text/javascript">
        function t(text, obj) {
            if (window.__i18n__) {
                try {
                    var json = window.__i18n__.resources[window.__i18n__.locale]['translation']
                    if (obj) {
                        for (var key in obj) {
                            var reg = new RegExp("{{" + key + "}}");
                            json[text] = json[text].replace(reg, obj[key])
                        }
                        return json[text]
                    } else {
                        return json[text]
                    }
                } catch (err) { }
            } else {
                return text
            }
        }
        document.title = t(window.__COMPANY_INFO_i18n_key.title)
        window.onload = function () {

            /**
             * 获取请求参数
             * @param {*} param
             * @returns
             */
            function getUrlParam(param) {
                var reg = new RegExp("(^|&)" + param + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
                var r = window.location.search.substring(1).match(reg); //匹配目标参数
                if (r != null) return decodeURI(r[2]);
                return null; //返回参数值
            }
            var error_code = getUrlParam('error_code') || ''
            var error_count = getUrlParam('error_count') || ''
            var lock_time = getUrlParam('lock_time') || ''
            var need_strength = getUrlParam('need_strength') || ''

            var $dt1 = document.getElementById('dt1');

            if (error_code == 100003) { //账号被锁
                $dt1.innerHTML =
                    t('您已输错密码{{error_count}}次，帐号已被冻结，请过{{lock_time}}分钟之后再登录', { error_count: error_count, lock_time: lock_time });
                var time = parseInt(lock_time);
                var interval = setInterval(function () {
                    if (time > 0) {
                        time--;
                        $dt1.innerHTML =
                            t("您已输错密码{{error_count}}次，帐号已被冻结，请过{{lock_time}}分钟之后再登录", { error_count: error_count, lock_time: time });
                    } else {
                        clearInterval(interval);
                    }
                }, 60000);
            } else if (error_code == 100006) { //密码强度不够
                var strang = '';
                if (need_strength == 1) {
                    strang = t("弱");
                } else if (need_strength == 2) {
                    strang = t("中");
                } else if (need_strength == 3) {
                    strang = t("强");
                }
                $dt1.innerHTML = t('由于安全原因，系统要求的登录密码强度为{{strang}}，请到【设置】-【个人设置】中修改登录密码', { strang: strang });
            } else if (error_code == 100005) { //账号周期已到，需要修改密码
                $dt1.innerHTML = t("密码已失效，请到【设置】-【个人设置】中重新设置密码");
            } else if (error_code == 100002) { //密码错误
                $dt1.innerHTML = t("用户名或密码错误，请重新登录");
            } else if (error_code == 100004) { //首次登录修改密码
                $dt1.innerHTML = t("为保障您的账号安全,首次登录前请到【设置】-【个人设置】中重新设置密码");
            }
        }

    </script>
</head>

<body>
    <div id="wrap">
        <div id="main" class="group">
            <div class="angel left"></div>
            <div class="left">
                <dl>
                    <dt id="dt1"></dt>
                </dl>
            </div>
        </div>
    </div>

</body>
</html>
